package day8.pack2;

public final class Car extends MotoVehicle {

    public Car() {

    }

    public Car(String type, String no) {
        setType(type);
        setNo(no);
    }
    private String type;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public int calcRent(int days) {
        if(CarEnum.BKSW.getCarName().equals(this.getType())) {
            return CarEnum.BKSW.getCarPrice() * days;
        }
        if(CarEnum.BMW550I.getCarName().equals(this.getType())) {
            return CarEnum.BMW550I.getCarPrice() * days;
        }
        if(CarEnum.BKLY.getCarName().equals(this.getType())) {
            return CarEnum.BKLY.getCarPrice() * days;
        }
        return 0;
    }
}
